package cn.lanchengkeji.datafillingsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户登陆记录
 * </p>
 *
 * @author yixu
 * @since 2020-04-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("train_operation_log")
@ApiModel(value="OperationLog对象", description="用户登陆记录")
public class OperationLog extends Model<OperationLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "操作类型")
    private String operationType;

    @ApiModelProperty(value = "users.id")
    private Integer operationUserId;

    private String operationRealName;

    private String operationUserName;

    @ApiModelProperty(value = "操作用户单位")
    private String operationUserOrganization;

    private Date operationDate;

    private String operationEvent;

    @ApiModelProperty(value = "操作人IP")
    private String remoteIp;

    @ApiModelProperty(value = "操作菜单")
    private String operationMenu;


    public static final String ID = "id";

    public static final String OPERATION_TYPE = "operation_type";

    public static final String OPERATION_USER_ID = "operation_user_id";

    public static final String OPERATION_REAL_NAME = "operation_real_name";

    public static final String OPERATION_USER_NAME = "operation_user_name";

    public static final String OPERATION_USER_ORGANIZATION = "operation_user_organization";

    public static final String OPERATION_DATE = "operation_date";

    public static final String OPARATION_EVENT = "operation_event";

    public static final String REMOTE_IP = "remote_ip";

    public static final String OPERATION_MENU = "operation_menu";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
